<section id="registraion-form">
    
    <?php if (isset($errors)): ?>
        <pre><?php print_r($errors) ?></pre>
    <?php endif; ?>
    
    <h2>Registration form</h2>
    <form method="POST">
        
        <?php if (isset($form)): ?>
            <b>Login:</b>
            <p><input type="text" name="login" value="<?php echo $form['login'] ?>"></p>

            <b>Email:</b>
            <p><input type="text" name="email" value="<?php echo $form['email'] ?>"></p>

            <b>Password:</b>
            <p><input type="text" name="password" value="<?php echo $form['password'] ?>"></p>
        <?php else: ?>
            <b>Login:</b>
            <p><input type="text" name="login"></p>

            <b>Email:</b>
            <p><input type="text" name="email"></p>

            <b>Password:</b>
            <p><input type="text" name="password"></p>
        <?php endif; ?>

        <button type="submit">Sign Up</button>
    </form>
</section>